<html>
<body>
<h1 style="color:green;text-align:center">Insert data into database </h1>
<form action="inserts.php" method="post" style="padding-left:45%;padding-top:10%;">
<input type="text" name="name" placeholder="Enter Name" required><br/><br/>
<input type="text" name="age" placeholder="Enter Age" required><br/><br/>
<input type="submit" value="submit" name="submits">

</form>
</body>
<?php

include "config.php";
if(isset($_POST['submits']))
{

$name=$_POST['name'];
$age=$_POST['age'];
$query="insert into addd(NAME,AGE) value ('$name','$age')";

$res=mysqli_query($con,$query);
if($res)
{
header('location:ind.php');
}

}





?>
</html>
